package com.example.unisys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.unisys.entity.MainCourse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MainCourseMapper extends BaseMapper<MainCourse> {

    int insert(MainCourse maincourse);

    int insertSelective(MainCourse maincourse);

    int update(MainCourse maincourse);

    List<MainCourse> getBySchool(@Param("main_school")String main_school);

    MainCourse getById(@Param("main_school")String main_school,@Param("course_id")String course_id);

    Integer getAllCourse(@Param("main_school") String main_school);

    List<MainCourse> getMainValidCourse(@Param("main_school")String main_school,@Param("start") int start,@Param("pagesize") int pagesize);

    Integer getMainValidCourseSum(@Param("main_school")String main_school);

    List<MainCourse> getByMainSchool(@Param("main_school")String main_school,@Param("start") int start,@Param("pagesize")int page);

    Integer delete(@Param("course_id") String course_id,@Param("main_school") String main_school);


}
